home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / MAGS.ZIP / VLAD#2.ZIP / ARTICLE.2_4 < prev    next >
Encoding:
Text File  |  1994-10-28  |  22.4 KB  |  861 lines

  1.  
  2.    Here is AMI's Flash BIOS specification.  Alot of it is technical
  3.    shit, the most important thing is the interrupts.  (Int 16 function E0H)
  4.    This thing was hard to find.  Extremely so.  It was hidden amongst
  5.    a few hundred other txt files in the AMI ftp site with some obscure
  6.    name.  Even if someone did see it they probably aren't virus programmers
  7.    anyway.  You won't find this information anywhere else.  Ralph Brown's
  8.    doesn't even have it.
  9.    
  10.    I'm not too sure how the voltage works so I'll just take pot
  11.    luck and turn it up because I saw that mentioned a few times... hmmm
  12.    I wonder if you could burn out a chip by changing the voltage high
  13.    during normal computing ?  BwaHaHAhaHaha  :)  nah that would be wrong :)
  14.  
  15.    It is suggested you just refer to this and only scan it for interesting
  16.    parts.
  17.  
  18. ------------------------------
  19.  
  20.  
  21. AMIFLASH - Flash Implementation Guide                   1992-1994  
  22.  
  23. American Megatrends, Inc.  All Rights Reserved.
  24.  
  25. Page 0 of 20
  26.  
  27. American Megatrends, Inc.
  28.  
  29.  
  30.  
  31. AMIFLASH
  32.  
  33. Flash Implementation Guide
  34.  
  35. Summary
  36.  
  37. This document provides a guideline to Flash implementation in the ISA, EISA,
  38. PS/2 compatible motherboard and describes the AMIFLASH, the Flash programming
  39. utility, interface with AMIBIOS, dated 080893 or later for HiFlex BIOS and
  40. dated 111593 or later for WinBIOS.
  41.  
  42.  
  43. Revision  2.0                           January 10, 1994
  44.  
  45.  
  46. Copyright 1992-1994  American Megatrends, Inc.
  47.  
  48.  
  49.     [Shit copyright thing here...]
  50.  
  51.     [More shit saying about AMI's rights]
  52.  
  53.  
  54. For Additional Information
  55.  
  56. Call American Megatrends BIOS Sales Department at 1-800-828-9264 for
  57. additional information about AMIFLASH.
  58.  
  59.  
  60.     [Shit disclaimer]
  61.  
  62.     [Limited warranty notice]
  63.  
  64.     [Trademark thingy]
  65.  
  66.     [Revision History]
  67.  
  68.  
  69.  
  70. 0.0  INTRODUCTION
  71.  
  72. This document describes the software (BIOS and utility) and hardware details
  73. of flash EPROM implementation in the motherboard.
  74.  
  75. The flash Programming Utility is required for on-board programming of flash
  76. EPROMs which helps user update the system with new releases of BIOS without
  77. any difficulty (e.g. opening of system chassis, taking out the EPROM,
  78. re-program the EPROM, etc.).
  79.  
  80.  
  81. The flash programming utility is unique for each hardware d
  82. design. This gives rise to a situation where user wil
  83.  
  84. The flash programming utility is unique for each hardware design. This gives 
  85. rise to a situation where user will be having a different flash programming 
  86. utility for each hardware design. So it is getting very difficult for user to
  87. control so many utilities which basically does the same thing but a
  88. particular utility does not work on any motherboard other than on the one
  89. for which it is meant for.
  90.  
  91. A few of many factors which make flash programming utility dependent on the 
  92. hardware design are stated below:
  93.  
  94. Method of raising/lowering Vpp depends on hardware.
  95.  
  96. Method of making flash write-enabled depends on hardware.
  97.  
  98. Method of disabling shadow RAMs depends on hardware.
  99.  
  100. Method of disabling cache depends on hardware.
  101.  
  102. Method of generating hardware reset may depend on hardware.
  103.  
  104. In case of non-fatal error (e.g. flash not present, etc.), the flash 
  105. programming utility must be capable of returning to original operating 
  106. condition. This demands certain current system information to be saved before
  107. access to flash can start. These information include the current shadow
  108. status, cache status, power management status, etc. These information depend
  109. on the hardware.
  110.  
  111.  
  112. 0.1  GENERALIZATION OF FLASH PROGRAMMING UTILITY
  113.  
  114. This specification is meant for generalizing the flash programming utility
  115. so that a single flash programming utility can work on all hardware platform.
  116. This demands some interface between flash utility and the BIOS. Following
  117. describes the AMIBIOS specification which needs to be implemented in BIOS to
  118. have a single flash utility for all motherboards.
  119.  
  120. The different requirements for flash programming are implemented in AMIBIOS
  121. through Function# 0E0h of INT-16.
  122.  
  123. The Section-1 of the current document contains the functional specification
  124. of the flash programming functions to be implemented in AMIBIOS and Section-2
  125. contains the sample hardware implementation of flash circuit.
  126.  
  127. 0.2  DIFFERENT TYPES OF FLASH EPROM AND HARDWARE REQUIREMENTS
  128.  
  129. The flash EPROMs are mainly of two types namely,
  130.  
  131.  
  132.       Normal flash (non-sectored) e.g. Intel 28010.
  133.  
  134.   Sectored flash e.g. Intel 28F001BX-T commonly known as boot-block flash.
  135.  
  136.  
  137. This document is generated using the above two types of flash as example.
  138.  
  139.  
  140. 0.2.0  NORMAL (NON-SECTORED) FLASH - Intel 28F010
  141.  
  142. This is mainly a replacement of standard EPROM with added capability of
  143. reprogramming of the flash EPROM on-board without taking it out from the 
  144. motherboard. The hardware requirement for this type of flash is
  145.  
  146.  
  147. Method to raise Vpp (programming voltage) to 12.0V. Method to lower Vpp to 
  148. normal voltage level.
  149.  
  150. Method to make flash write-enabled. Method to make flash write-protected
  151. (i.e. read-only).
  152.  
  153. Please see Section-2 for sample example for hardware implementation.
  154.  
  155. The main disadvantage of this type of flash is that in case of an error
  156. (due to accidental power failure, etc.) during reprogramming the flash
  157. on-board, the flash eprom must be taken out from the motherboard and must
  158. be reprogrammed with help of eprom programmer.
  159.  
  160.  
  161. 0.2.1  SECTORED FLASH - Intel 28F001BX-T
  162.  
  163. This is also a replacement of standard EPROM with added capability of
  164. reprogramming of the flash EPROM on-board without taking it out from the
  165. motherboard. But this flash also has another feature of hardware protecting
  166. one block of the flash from accidental eraser. This type of flash is based
  167. on block architecture and consists of several blocks.
  168.  
  169. Intel 28F001BX-T has four separate blocks, one hardware protected 8KByte boot
  170. block, two 4KByte parameter blocks and one 112Kbyte code block. The boot
  171. block usually contains a recovery code (also called sometimes as boot block
  172. code) while other three blocks contain the main BIOS and other parameters. 
  173. This allows the updating of other three blocks possible with the help of
  174. recovery code even in case of power failure during flash update with flash
  175. programming utility. Of course, the programming utility can not program the
  176. boot block (thereby can not destroy the recovery code) because the boot block
  177. is hardware protected from accidental eraser/write.
  178.  
  179.  
  180. The general functionality of recovery code is as follows: after power-on, the
  181. recovery code gets control. The recovery code checks for the validity of the
  182. main BIOS code and if main BIOS is found to be good, recovery code will pass
  183. the control to the main BIOS. If main BIOS is found to bad, then this
  184. recovery code reads the BIOS update ROM file from floppy drive A:, erases
  185. the other three blocks of flash EPROM, programs the other three blocks of
  186. flash EPROM with the data read from diskette in drive A: and generates CPU
  187. reset thereby re-booting the system.
  188.  
  189. The important point to be noticed is that at power-on, recovery code is seen
  190. at F segment namely at system address space FE000-FFFFF. But when recovery
  191. code gives control to the main bios, the main bios must be mapped to system
  192. address space in F segment namely, F0000-FFFFF. This needs some sort of
  193. address inversion mechanism by which recovery code can invert A16 before
  194. giving control to main BIOS.
  195.  
  196. At power-on, the mapping of physical flash eprom space to the system address
  197. space is shown in Fig. 1 
  198. (See Page 6).
  199.  
  200. During runtime i.e. after recovery code transfers control to main BIOS, the
  201. mapping of physical flash eprom space to the system address space is shown
  202. in Fig. 2 
  203. (See Page 6)
  204.  
  205. So it is clear that address line A16 inversion is needed in runtime (before
  206. recovery code can pass control to main BIOS) so that main BIOS code can be
  207. seen at system address space F0000-FFFFF.
  208.  
  209. The hardware requirement for this type of flash is
  210.  
  211. Method to raise Vpp (programming voltage) to 12.0V. Method to lower Vpp to 
  212. normal voltage level.
  213.  
  214. Method to make flash write-enabled. Method to make flash write-protected
  215. (i.e. read-only).
  216.  
  217. Method to invert address line A16.
  218.  
  219. Hardware protection of boot block. 
  220.  
  221. Please see Section-2 for sample example for hardware implementation.
  222.  
  223.  
  224.  
  225. SECTION - 1
  226.  
  227.  
  228. SPECIFICATION OF FLASH PROGRAMMING FUNCTIONS IN AMIBIOS
  229.  
  230. 1.0  EXTRA FUNCTIONS IN INT-16 FOR FLASH PROGRAMMING
  231.  
  232. The flash programming requirement is implemented in AMIBIOS through
  233. Function# 0E0h in INT-16. This specification is valid for Version 2.00 of
  234. the specification for extra functions in INT-16 for flash programming.
  235.  
  236. The general specification is:
  237.  
  238. Input :
  239.  
  240.         AH      E0h
  241.  
  242.         AL      subfunction
  243.  
  244.         Other input parameters are specific to subfunction.
  245.  
  246.  
  247. Output:
  248.  
  249.         CY      Error
  250.  
  251.         NC      Success
  252.  
  253.         AL      FAh
  254.  
  255.         Other output parameters are specific to subfunction.
  256.  
  257.  
  258. The output value in register AL should be checked for FAh even if function
  259. returns NC to ensure success.
  260.  
  261.  
  262. The different subfunctions are stated below and specifications are described
  263. later.
  264.  
  265.  
  266. Subfunction#            Description
  267.  
  268.  
  269.  
  270. 00h                 Get Version Number of BIOS-FLASH Interface
  271.  
  272. 01h                 Get Chipset Save/Restore Status Requirement
  273.  
  274. 02h                 Save Chipset Status and Prepare Chipset
  275.  
  276. 03h                 Restore Chipset Status
  277.  
  278. 04h                 Lower Programming Voltage Vpp
  279.  
  280. 05h                 Raise Programming Voltage Vpp
  281.  
  282. 06h                 Flash Write Protect
  283.  
  284. 07h                 Flash Write Enable
  285.  
  286. 08h                 Flash Select
  287.  
  288. 09h                 Flash De-Select
  289.  
  290. 0Ah                 Verify Allocated Memory
  291.  
  292. 0Bh                 Save Internal Cache Status
  293.  
  294. 0Ch                 Restore Internal Cache Status
  295.  
  296. 0Dh-FEh             RESERVED for future use
  297.  
  298. FFh                 Generate CPU Reset
  299.  
  300.  
  301. 1.0.0  GET VERSION NUMBER OF BIOS-FLASH INTERFACE - Subfunction# 00h
  302.  
  303.  
  304.  
  305. This routine returns the version number of BIOS-Flash interface
  306. implementation in BCD format in register BX. For example, the version number
  307. 2.00 is returned in BX as 0200h.
  308.  
  309.  
  310. This routine can be used to determine whether the BIOS-Flash interface is
  311. implemented in BIOS. After returning from the subfunction, the register AL
  312. should be checked for FAh even if it is returned with NC.
  313.  
  314.  
  315.  
  316. Input :
  317.  
  318.         AH      E0h
  319.  
  320.         AL      00h
  321.  
  322.  
  323.  
  324. Output:
  325.  
  326.         CY      BIOS-Flash interface not implemented
  327.  
  328.         NC      BIOS-Flash interface implemented
  329.  
  330.         AL      FAh
  331.  
  332.         BX      Version number in BCD format
  333.  
  334.  
  335.  
  336. Register destroyed:     AX  BX
  337.  
  338.  
  339.  
  340. This version of implementation should return 0200h (i.e. Version number
  341. 2.00) in register BX.
  342.  
  343.  
  344.  
  345. 1.0.1  GET CHIPSET SAVE/RESTORE STATUS REQUIREMENT Subfunction# 01h
  346.  
  347.  
  348. This routine returns the data area space needed to save the current chipset
  349. status.
  350.  
  351.  
  352.  
  353. Input :
  354.  
  355.         AH      E0h
  356.  
  357.         AL      01h
  358.  
  359.  
  360.  
  361. Output:
  362.  
  363.         CY      Error
  364.  
  365.         NC      Successful
  366.  
  367.         AL      FAh
  368.  
  369.         BX      #of bytes needed to save chipset environment
  370.  
  371.  
  372.  
  373. Register destroyed:     AX  BX
  374.  
  375.  
  376. 1.0.2  SAVE CHIPSET STATUS AND PREPARE CHIPSET - Subfunction# 02h
  377.  
  378.  
  379.  
  380. This routine saves the current chipset status in the specified data area
  381. and then prepares the chipset to make the flash EPROM accessible.
  382.  
  383.  
  384.  
  385. Things to be saved here are current status of cache, power management
  386. status, shadow status, etc. This is needed so that in case of non-fatal
  387. error, system can be restored to status where it was before invoking the
  388. flash programming utility. The preparation of chipset to make flash EPROM
  389. accessible includes disabling of shadow rams, disabling of external cache,
  390. disabling of internal cache, disabling of power management, etc. Note that
  391. the features which get disabled should be saved first. The disabling of
  392. cache may be needed to make the target ROM address space non-cacheable. If
  393. target ROM address space is cacheable only if shadow is enabled (i.e. only
  394. shadow ram is cacheable, but rom is not cacheable), disabling of shadow ram
  395. will also make the target ROM address space non-cacheable and so in this
  396. case, disabling of cache is not required. But if ROM is cacheable, then
  397. cache must be disabled. This routine must disable internal cache.
  398.  
  399.  
  400.  
  401. Input :
  402.  
  403.         AH      E0h
  404.  
  405.         AL      02h
  406.  
  407.         ES:DI   pointer to start of buffer where chipset status 
  408.         will be saved
  409.  
  410.  
  411. Output:
  412.  
  413.         CY      Error
  414.  
  415.         NC      Successful
  416.  
  417.         AL      FAh
  418.  
  419.  
  420.  
  421. Register destroyed:     AX
  422.  
  423.  
  424.  
  425. 1.0.3  RESTORE CHIPSET STATUS - Subfunction# 03h
  426.  
  427.  
  428.  
  429. This routine restores the chipset status from the specified data area where
  430. the chipset status was saved by subfunction-02h.
  431.  
  432.  
  433.  
  434. Input :
  435.  
  436.         AH      E0h
  437.  
  438.         AL      03h
  439.  
  440.         ES:DI   ptr to start of buffer from where the chipset environment
  441.         will be restored
  442.  
  443.  
  444. Output:
  445.  
  446.         CY      Error
  447.  
  448.         NC      Successful
  449.  
  450.         AL      FAh
  451.  
  452.  
  453.  
  454. Register destroyed:     AX
  455.  
  456.  
  457. 1.0.4  LOWER PROGRAMMING VOLTAGE Vpp - Subfunction# 04h
  458.  
  459.  
  460.  
  461. This routine lowers the programming voltage Vpp to normal level. This
  462. routine must wait until the voltage level gets stabilized.
  463.  
  464.  
  465.  
  466. Input :
  467.  
  468.         AH      E0h
  469.  
  470.         AL      04h
  471.  
  472.  
  473.  
  474. Output:
  475.  
  476.         CY      Error
  477.  
  478.         NC      Successful
  479.  
  480.         AL      FAh
  481.  
  482.  
  483.  
  484. Register destroyed:      AX
  485.  
  486.  
  487. 1.0.5  RAISE PROGRAMMING VOLTAGE Vpp - Subfunction# 05h
  488.  
  489.  
  490. This routine raises the programming voltage Vpp to required voltage (i.e. 
  491. to 12.0 Volt for a 12V flash EPROM). This routine must wait until the
  492. voltage level gets stabilized.
  493.  
  494.  
  495.  
  496. Input :
  497.  
  498.         AH      E0h
  499.  
  500.         AL      05h
  501.  
  502.  
  503.  
  504. Output:
  505.  
  506.         CY      Error
  507.  
  508.         NC      Successful
  509.  
  510.         AL      FAh
  511.  
  512.  
  513.  
  514. Register destroyed:      AX
  515.  
  516.  
  517.  
  518. 1.0.6  FLASH WRITE PROTECT - Subfunction# 06h
  519.  
  520.  
  521.  
  522. This routine makes the flash write-protected. This routine must provide any
  523. delay (if required) for stabilization.
  524.  
  525.  
  526. Input :
  527.  
  528.         AH      E0h
  529.  
  530.         AL      06h
  531.  
  532. Output:
  533.  
  534.         CY      Error
  535.  
  536.         NC      Successful
  537.  
  538.         AL      FAh
  539.  
  540.  
  541. Register destroyed:      AX
  542.  
  543.  
  544. 1.0.7  FLASH WRITE ENABLE - Subfunction# 07h
  545.  
  546.  
  547. This routine makes the flash write-enabled. This routine must provide any
  548. delay (if required) for stabilization.
  549.  
  550. Input :
  551.  
  552.         AH      E0h
  553.  
  554.         AL      07h
  555.  
  556. Output:
  557.  
  558.         CY      Error
  559.  
  560.         NC      Successful
  561.  
  562.         AL      FAh
  563.  
  564. Register destroyed:      AX
  565.  
  566.  
  567. 1.0.8  FLASH SELECT - Subfunction# 08h
  568.  
  569.  
  570. This routine selects the flash. This function is not needed normally. But if
  571. the motherboard has both normal EPROM and flash EPROM present simultaneously
  572. then this routine needs to be implemented. This routine must provide any
  573. delay (if required) for stabilization. If this routine is not needed, then
  574. it must return with successful status.
  575.  
  576.  
  577.  
  578. Input :
  579.  
  580.         AH      E0h
  581.  
  582.         AL      08h
  583.  
  584.  
  585. Output:
  586.  
  587.         CY      Error
  588.  
  589.         NC      Successful
  590.  
  591.         AL      FAh
  592.  
  593.  
  594. Register destroyed:     AX
  595.  
  596.  
  597. 1.0.9  FLASH DE-SELECT - Subfunction# 09h
  598.  
  599.  
  600. This routine de-selects the flash. This function is not needed normally. But
  601. if motherboard has both normal EPROM and flash EPROM present simultaneously
  602. then this routine needs to be implemented. This routine must provide any
  603. delay (if required) for stabilization. If this routine is not needed, then
  604. it must return with successful status.
  605.  
  606.  
  607. Input :
  608.  
  609.         AH      E0h
  610.  
  611.         AL      09h
  612.  
  613.  
  614. Output:
  615.  
  616.         CY      Error
  617.  
  618.         NC      Successful
  619.  
  620.         AL      FAh
  621.  
  622.  
  623. Register destroyed:     AX
  624.  
  625.  
  626. 1.0.10  VERIFY ALLOCATED MEMORY - Subfunction# 0Ah
  627.  
  628. This routine verifies whether the specified memory can be used or not. This
  629. routine is not needed in normal situation. But in situation like where the
  630. certain memory regions become un-accessible under some special conditions
  631. (e.g. if shadow gets disabled, memory 80000h-9FFFFh may become un-accessible,
  632. etc.), this routine should be used to verify the memory region to be used by
  633. flash programming utility is valid or not. If this routine is not needed,
  634. then it must return with successful status.
  635.  
  636.  
  637. Input :
  638.  
  639.         AH      E0h
  640.  
  641.         AL      0Ah
  642.  
  643.         ES      specified memory segment
  644.  
  645.         BX      memory size in number of paragraphs
  646.  
  647.  
  648. Output:
  649.  
  650.         CY      Error
  651.  
  652.         NC      Successful
  653.  
  654.         AL      FAh
  655.  
  656.  
  657. Register destroyed:      AX
  658.  
  659. A zero (0) input value of BX will be returned as an error.
  660.  
  661.  
  662. 1.0.11  SAVE INTERNAL CACHE STATUS - Subfunction# 0Bh
  663.  
  664. This routine saves the current status of internal cache. Before saving this
  665. routine must check that internal cache is available in the concerned
  666. hardware. It is the responsibility of the caller to ensure that length of
  667. supplied buffer (where the internal cache status will be saved) is at least
  668. 16bytes.
  669.  
  670.  
  671. If internal cache is not available in the concerned hardware or this
  672. subfunction is called in protected mode , this routine must return error.
  673.  
  674.  
  675. Input :
  676.  
  677.         AH      E0h
  678.  
  679.         AL      0Bh
  680.  
  681.         ES:DI   pointer to start of buffer where internal cache status
  682.         will be saved
  683.  
  684.  
  685. Output:
  686.  
  687.         CY      Error
  688.  
  689.         NC      Successful
  690.  
  691.         AL      FAh
  692.  
  693. Register destroyed:      AX
  694.  
  695. 1.0.12  RESTORE INTERNAL CACHE STATUS - Subfunction# 0Ch
  696.  
  697.  
  698. This routine restores the internal cache status from the specified data area
  699. where internal cache status was saved by subfunction# 0Bh.
  700.  
  701.  
  702. If this subfunction is called in protected mode, this routine must return
  703. error.
  704.  
  705. Input :
  706.  
  707.         AH      E0h
  708.  
  709.         AL      0Ch
  710.  
  711.         ES:DI   pointer to start of buffer from where internal cache
  712.         status will be restored
  713.  
  714.  
  715. Output:
  716.  
  717.         CY      Error
  718.  
  719.         NC      Successful
  720.  
  721.         AL      FAh
  722.  
  723.  
  724. Register destroyed:      AX
  725.  
  726.  
  727. 1.0.13  GENERATE CPU RESET - Subfunction# FFh
  728.  
  729.  
  730. This routine generates the CPU reset. This reset generation is needed to
  731. make system re-boot after successful programming of flash.
  732.  
  733.  
  734. Note that control will never go back to caller from this routine.
  735.  
  736. Input :
  737.  
  738.         AH      E0h
  739.  
  740.         AL      FFh
  741.  
  742. Output:
  743.  
  744.         Not Needed
  745.  
  746.  
  747. 1.1  NOTES
  748.  
  749. In some hardware, raising of programming voltage Vpp and making flash
  750. write-enabled may be implemented using the same method. And lowering of
  751. programming voltage Vpp and making flash write-protected may also be
  752. implemented using the same method. In these type of cases, implement the
  753. subfunctions as follows:
  754.  
  755. Implement LOWER PROGRAMMING VOLTAGE Vpp - Subfunction# 04h and FLASH WRITE
  756. PROTECT - Subfunction# 06h using same routine.
  757.  
  758. Implement RAISE PROGRAMMING VOLTAGE Vpp - Subfunction# 05h and FLASH WRITE
  759. ENABLE - Subfunction# 07h using same routine.
  760.  
  761.  
  762. SECTION - 2
  763.  
  764.  
  765. HARDWARE IMPLEMENTATION OF FLASH
  766.  
  767.  
  768. 2.0  SAMPLE HARDWARE IMPLEMENTATION OF FLASH
  769.  
  770. A sample implementation block diagram of flash is shown in Fig. 3. Please
  771. note that this is only an example, actual implementation may vary from
  772. hardware to hardware.
  773.  
  774.  
  775. In this example, the two bits of an I/O port are used to control the write
  776. enable signal to flash and A16 inversion. Both these bits must be readable
  777. as well as writeable. Vpp is connected to 12V always if flash EPROM is a
  778. 12V part otherwise can be always connected to 5V if flash EPROM is a 5V
  779. part. For a 12V flash EPROM part, even if Vpp is always connected to 12V,
  780. the write to flash is controlled by ENFLSHWR# signal. PWD# is connected to
  781. POWEROK signal to protect boot block from eraser/write.
  782.  
  783.  
  784. ENFLSHWR#
  785.  
  786. This signal must be HIGH on reset so that ORing of ENFLSHWR# and MEMW#
  787. signals will be HIGH thereby disabling any write to flash EPROM. Please
  788. note that WR# signal on EPROM must be LOW to make flash writeable. So the
  789. bit used to control ENFLSHWR# signal should be HIGH normally to make flash
  790. EPROM write protected and must be programmed to LOW to flash EPROM write
  791. enabled.
  792.  
  793.  
  794. FLSHSWP
  795.  
  796. This signal must be LOW on reset so that SA16 signal can reach flash EPROM
  797. without inversion through the XOR gate.  So the bit used to control FLSHSWP
  798. signal should be LOW on power-on to make boot block (recovery) code appear
  799. at system address space FE000-FFFFF and must be programmed to HIGH to invert
  800. A16 line so that main BIOS can be seen at system address space F0000-FFFFF.
  801.  
  802.  
  803. PWD#
  804.  
  805. PWD# on flash EPROM will be connected to POWEROK (which is at 5V) thereby
  806. hardware protecting boot block from eraser/write. The need for connecting
  807. PWD# to POWEROK instead of directly to Vcc (5V) is explained below:
  808.  
  809. If PWD# is connected to Vcc (5V), then it is true that boot block is
  810. protected from eraser/write. But during programming of other blocks of
  811. flash EPROM, if the programming is stopped for some reason e.g. pressing of
  812. hardware reset switch (usually present at the front panel of the system),
  813. then flash EPROM may be left in an undefined state (which may not be the
  814. normal read array mode state of flash EPROM) thereby causing the system hang.
  815. To come out of this undefined state, power must be turned off and on again
  816. thereby resetting the flash EPROM and resetting of flash EPROM will resets
  817. the flash EPROM to read array mode.
  818.  
  819.  
  820. So PWD# is connected to POWEROK signal which is ANDing of the POWERGOOD
  821. signal (which is HIGH normally when power is on) from power supply and the
  822. RESET signal from the hardware reset switch (which is HIGH normally when
  823. reset switch is not pressed). So under normal operating condition, POWEROK
  824. will be HIGH and so PWD# will be HIGH. As soon as hardware reset switch is
  825. pressed, then RESET signal from hardware reset switch will go LOW thereby
  826. making the POWEROK signal LOW thereby causing the flash EPROM to enter deep
  827. power down mode. When hardware reset switch is released, the RESET signal
  828. from hardware reset switch will go HIGH thereby making the POWEROK signal
  829. HIGH thereby causing the flash EPROM to come out of deep power down mode.
  830. The exit from deep power down mode will automatically reset the flash EPROM
  831. to read array mode.
  832.  
  833.  
  834. 2.1  NOTES
  835.  
  836.  
  837. The bits of an I/O Port used in the sample implementation, can be the two
  838. unused pins of keyboard controller. Note that if unused pin of keyboard
  839. controller is used, care must be taken to generate proper polarity of the
  840. concerned signal because usually unused pins of keyboard controller are
  841. HIGH on power-on.
  842.  
  843. Even though Vpp is always connected to actual programming voltage as shown
  844. in Fig. 3, the write to flash is controlled by ENFLSHWR# signal. Of course
  845. a switching circuit can be very well used to raise/lower Vpp in which case
  846. another bit (which must be readable and writeable) of I/O Port may be
  847. needed.
  848.  
  849.  
  850. [ASCII shit for the rest of the file - OLE picture methinks]
  851.  
  852.  
  853. parameter blocks and 48K of main block
  854. ( this usually contain power 
  855. management code,
  856. VGA BIOS, etc. )
  857.  
  858.  
  859. [The end]
  860.  
  861.